﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="queryTeacher.aspx.cs" Inherits="admin_queryTeacher" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
   <link href="../../css/body.css" rel="stylesheet" type="text/css" />
    <link href="../../css/table.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .main
        {
            margin-left:50px;
            margin-top:30px;
            width: 860px;
            height: 100%;
            background-color: #FFFFFF;
            border: 0;
        }
        .left
        {
            margin-left: 10px;
            margin-top: 20px;
            width: 220px;
            float: left;
            background-color: #ffffff;
        }
        .rigth
        {
            margin-left: 10px;
            margin-top: 30px;
            width: 600px;
            background-color: #ffffff;
            float: left;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="main">
        <div class="left">
            编号：<asp:TextBox Id="tb_teacherId" runat="server" 
                Width="150px"></asp:TextBox>
            <br />
            <hr />
            姓名：<asp:TextBox Id="tb_name" runat="server" 
                Width="150px"></asp:TextBox>
            <hr />
            简介：<asp:TextBox Id="tb_about" runat="server" 
                Width="150px"></asp:TextBox>
            <br />
            <hr />
            状态：<asp:DropDownList ID="ddl_status" runat="server" Height="20px" Width="155px">
            </asp:DropDownList>
            <asp:Button ID="btn_search" runat="server" Text="搜索" onclick="btn_search_Click" />
            <br />
        </div>
        <div class="rigth">
            <table align="center" id="Tab" class="tab">
                <tr>
                    <th width="100">
                        教师编号
                    </th>
                    <th width="110">
                        姓名
                    </th>
                    <th width="100">
                        简介
                    </th>
                    <th width="100">
                        相片
                    </th>
                    <th width="60">
                        状态
                    </th>
                    <th width="100">新增课程</th>
                    <th width="50">修改</th>
                </tr>
                <asp:Repeater Id="teacherList" runat="server">
                    <ItemTemplate>
                        <tr style='background-color: <%#(Container.ItemIndex%2==0)?"#eeeeee":"#ffffff"%>'
                            onmouseover="this.style.background='#ddeeff'" onmouseout="this.style.background='<%#(Container.ItemIndex%2==0)?"#eeeeee":"#ffffff"%>'">
                            <td>
                                <a target="_blank" href="../../teacher.aspx?id=<%# DataBinder.Eval(Container.DataItem, "teacherId")%>">
                                    <%# DataBinder.Eval(Container.DataItem, "teacherId")%></a>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "teacherName")%>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "about").ToString().Length > 20 ? DataBinder.Eval(Container.DataItem, "about").ToString().Substring(0, 20)+"......" : DataBinder.Eval(Container.DataItem, "about").ToString()%>
                            </td>
                            <td>
                                <img src="<%# DataBinder.Eval(Container.DataItem, "picUrl")%>"  Height="50">
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "statusName")%>
                            </td>
                            <td>
                            <a href="../course/addCourse.aspx?id=<%# DataBinder.Eval(Container.DataItem, "teacherId")%>">
                                新增课程</a>
                        </td>
                        <td>
                                <a href="updateTeacher.aspx?id=<%# DataBinder.Eval(Container.DataItem, "teacherId")%>" target="_self">
                                    [修改]</a>
                            </td> 
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        <br />
        <br />
        <div align="center">
            [页次:<asp:Label ID="nowPage" runat="server" Font-Bold="True"></asp:Label>/<asp:Label
                ID="allPages" runat="server" Font-Bold="True" ForeColor="#C00000"></asp:Label>]
            [共<asp:Label ID="allMsg" runat="server" Font-Bold="True"></asp:Label>条
            <asp:Label ID="onePage" runat="server" Font-Bold="True"></asp:Label>条/页] [<asp:HyperLink
                ID="firstPage" runat="server">首页</asp:HyperLink>] [<asp:HyperLink 
                ID="prePage" runat="server" >上一页</asp:HyperLink>]
            [<asp:HyperLink ID="nextPage" runat="server">下一页</asp:HyperLink>] [<asp:HyperLink
                ID="endPage" runat="server" >尾页</asp:HyperLink>]
        </div>
        </div>
    </div>
    </form>
</body>
</html>
